<html>

<head>
    <script src="./libs/dat.gui.js"> </script>
    <script src="https://unpkg.com/vue"></script>

    <div id="app">
        <p>{{ message }}</p>
        <button v-on:click="reverseMessage">反转消息</button>
    </div>
</head>

<body>
    <script>
        var gui = new dat.GUI();
        gui.open();

        var app = new Vue({
            el: '#app',
            data: {
                message: 'Hello Vue.js!'
            },
            methods: {
                reverseMessage: function () {
                    this.message = this.message.split('').reverse().join('')
                }
            }
        });
    </script>
</body>

</html>